// export default (props, ctx) => <div>tree</div>

// import { defineComponent } from "vue";
// export default defineComponent({
//   render() {
//     return <div>tree22333</div>;
//   },
// });

// import { defineComponent } from "vue";
// export default defineComponent({
//   setup(props, ctx) {
//     return () => <div>tree8888</div>
//   }
// })

import { defineComponent, ref } from "vue";
export default defineComponent({
  props:["condition"],
  setup(props, ctx) {
    console.log(props,props.condition,'组件传值')
    // const condition = false;
    const list = ref(["我是循环1", "我是循环2"]);
    const counter = ref(0);
    return () => (
      <>
        <div>双向绑定{counter.value}</div>
        <div>{props.condition ? <span>A</span> : <span>B</span>}</div>
        {list.value.map((item, index) => (  <p key={index}>{item}</p>))}
        <input type="number" v-model={counter.value}/>
      </>
    );
  },
});
